
<{include file="www/header.tpl"}>
<{include file="www/header-base.tpl"}>

<div class="base-banner-wrap">
    <img src="<{$track.bannerUrl}>" class="base-banner">
</div>

<!-- 行程详情 start -->

<div class="xingc-box fix">
    <div class="sidebar">
        <ul class="sideul">
            <{foreach from=$dates key="n" item="day"}>
            <li class="li">
                <a href="#day<{$n}>" onclick="trivial_day(<{$n}>)" class="a"><{$day}></a>
            </li>
            <{/foreach}>
        </ul>
    </div>
    <div class="main" id="xingc-qieh">
        <ul class="menuul fix">
            <li class="menuli active">行程详情</li>
            <li class="menuli">地图</li>
        </ul>

        <div class="tab-box">
            <ul>
                <{foreach from=$days item=day name=dayloop}>
                <li class="li">
                    <{if $smarty.foreach.dayloop.index==0}>
                    <h3 class="title"><a href="javascript:;" name="day<{$day.dayNo}>" class="a">第<{$day.dayNo}>天</a></h3>
                    <{/if}>
                    <{if $day_num!=$day.dayNo}>
                    <h3 class="title"><a href="javascript:;" name="day<{$day.dayNo}>" class="a">第<{$day.dayNo}>天</a></h3>
                    <{/if}>
                    <img src="<{$day.iconUrl}>" alt="" class="imgicon">
                    <div class="de">
                        <img src="<{$day.thumb}>" alt="" class="img">
                        <h3 class="prompt"><{$day.name}></h3>
                        <p class="p"><{$day.desc}></p>
                        <p class="date"><{$day.timeStart}> 到 <{$day.timeStop}></p>
                        <a href="/scenicspot/detail/<{$day.id}>" class="a">查看详情</a>
                    </div>
                </li>
                <!--<{if $day_num<$day.dayNo}><{$day_num++}><{/if}>-->
                <{/foreach}>
            </ul>
            <{if $days|@count > 0}>
            <p class="jieshu"><a href="javascript:;" name="day999" class="a">旅行结束</a></p>
            <{/if}>
        </div>

        <div class="tab-box" style="opacity: 0; height: 0; overflow: hidden; padding: 0;">
            <div class="map-box">
                <{include file="www/track/track_detail_map.tpl"}>
            </div>
        </div>

    </div>
</div>

<!-- 行程详情 end -->

<script>

function tabSwitch2(oParent, oChild, aTab, oClass) {
    var aBtn = oParent.getElementsByClassName(oChild),
        aIndex_tab = document.getElementsByClassName(aTab);
    for (var i = 0; i < aBtn.length; i++) {
        aBtn[0].onclick = function() {
            for (var i = 0; i < aBtn.length; i++) {
                aBtn[i].className = oClass;
            }
            this.className += ' active';
            aIndex_tab[0].style.display = 'block';
            $(aIndex_tab).eq(1).css({'opacity':0,'height':'0','paddingTop':'0'});
        };

        aBtn[1].onclick = function() {
            for (var i = 0; i < aBtn.length; i++) {
                aBtn[i].className = oClass;
            }
            this.className += ' active';
            aIndex_tab[0].style.display = 'none';
            $(aIndex_tab).eq(1).css({'opacity':1,'height':'380px','paddingTop':'80px'});
        };

    }
}

tabSwitch2(document.getElementById('xingc-qieh'), 'menuli', 'tab-box', 'menuli');

$('.xingc-box').find('.a').eq(0).addClass('active');

$('.xingc-box').find('.a').each(function() {
    $(this).on('click', function() {
        $('.xingc-box').find('.a').attr("class","a");
        $(this).addClass('active');
    });
});

</script>

<{include file="www/footer.tpl"}>

